﻿using System;
/*
    Write an expression that calculates rectangle’s perimeter and area by given width and height.
 
    Examples:

    width	height	perimeter	area
    3	    4	        14	    12
    2.5	    3	        11	    7.5
    5	    5	        20	    25
 */
class Rectangles
    {
        static void Main()
        {
            Console.Write("Enter the width: ");
            double width = double.Parse(Console.ReadLine());

            Console.Write("Enter the height: ");
            double height = double.Parse(Console.ReadLine());

            Console.WriteLine();

            if ((width <= 0) || (height <= 0))
            {
                Console.WriteLine("Invalid number");
            }
            else
            {
                double Perimeter = 2 * (height + width);
                Console.WriteLine("The rectangle’s perimeter is: " + Perimeter);

                double area = height * width;
                Console.WriteLine("The rectangle’s area is: " + area);
            }

        }
    }
